package com.pwc.conversionTool.biz;


import java.util.List;

import com.pwc.conversionTool.dao.SoapConnectionDao;
import com.pwc.conversionTool.entity.Account;
import com.pwc.conversionTool.entity.SoapConnection;

public class SoapConnectionBiz {
	
private SoapConnectionDao soapConnectionDao=new SoapConnectionDao();
	
	
	public boolean saveSoapConnection(SoapConnection soapConnection,Account account)
	{
	
		soapConnection.setAccount(account.getKey());
		soapConnectionDao.saveAccount(soapConnection);
		
		
		return true;
	}
	
	
	public List<SoapConnection> getConnectionsByAccount(Account account)
	{
		return soapConnectionDao.getAllConnections(account.getKey());
	}


	public boolean deleteSoapConnection(SoapConnection soapConnection) {
		
		soapConnectionDao.deleteSoapConnection(soapConnection.getId());
		
		return true;
	}
	
	
	public SoapConnection getSoapConnectionById(Long id)
	{
		return soapConnectionDao.getSoapConnectionById( id);
	}

}
